import "./style.css";
import { arrayToTree } from "./tree.js";

// Example usage:
let array = [
  { id: 1, parentId: null },
  { id: 2, parentId: 1 },
  { id: 3, parentId: 2 },
];

let tree = arrayToTree(array);
console.log(tree);

const appElement = document.querySelector("#app");
appElement.innerHTML = JSON.stringify(tree);
